<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>添加商品</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8">
        <link href="/Public/css/mine.css" type="text/css" rel="stylesheet">
    </head>

    <body>

        <div class="div_head">
            <span>
                <span style="float:left">当前位置是：商品管理->添加商品</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="/index.php/admin/goods/showlist">【返回】</a>
                </span>
            </span>
        </div>
        <div></div>

        <div style="font-size: 13px;margin: 10px 5px">
            <form action="<?php echo U('Admin/Goods/tianjia');?>" method="post" enctype="multipart/form-data">
            <table border="1" width="100%" class="table_a">
                 <tr>
                    <td>商品分类</td>
                    <td>
                        <select name="cat_id">
                            <option>请选择</option>
                        <?php if(is_array($cats)): foreach($cats as $key=>$c): ?><option value="<?php echo ($c['cat_id']); ?>"><?php echo ($c['cat_name']); ?></option><?php endforeach; endif; ?>
                        </select><span><font color='red'>&nbsp;&nbsp;此处不选商品默认添加至栏目一</font></span>
                    </td>
                </tr>
                <tr>
                    <td>商品名称</td>
                    <td><input type="text" name="goods_name" value="" /></td>
                </tr>
               
                <tr>
                    <td>唯一商品码</td>
                    <td><input type="text" name="goods_sn" value="" /></td>
                </tr>
                <tr>
                    <td>商店价格</td>
                    <td><input type="text" name="shop_price" value="" /></td>
                </tr>
                <tr>
                    <td>市场价格</td>
                    <td><input type="text" name="market_price" value="" /></td>
                </tr>
                <tr>
                    <td>商品图片</td>
                    <td><input type="file" name="goods_img" value="" /></td>
                </tr>
                 <tr>
                    <td>商品数量</td>
                    <td><input type="text" name="goods_number" value="" /></td>
                </tr>
              
                <tr>
                    <td>是否上架</td>
                    <td><div>是<input id="qqq" type="checkbox" name="sta" value="1">&nbsp;&nbsp;否<input id="www" type="checkbox" name="sta" value="2"></div></td>
                </tr>
                
                 <tr>
                    <td>商品展示类型</td>
                    <td>
                        最新<input type="checkbox" name="is_new" value="1">&nbsp;
                        最好<input type="checkbox" name="is_best" value="2">&nbsp;
                        最受欢迎<input type="checkbox" name="is_hot" value="3">&nbsp;
                        促销商品<input type="checkbox" name="is_on_sale" value="4">
                             促销商品  <input type="checkbox" name="is_sall" value="5">
                        <!--促销活动<input type="checkbox" name="is_sale" value="4">-->
                    </td>
                </tr>
                <tr>
                    <td>商品详细描述</td>
                    <td>
                        <textarea name="content"></textarea>
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="提交">
                    </td>
                </tr>  
            </table>
            </form>
        </div>
    </body>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
<script>
  $('#qqq').click(function(){
        $('#qqq').prop('checked',true);
       $('#www').prop('checked',false);
  });
   $('#www').click(function(){
      $('#www').prop('checked',true);
       $('#qqq').prop('checked',false);
  });
</script>
</html>